import {defineStore} from 'pinia'
import {Department} from "@utils/resource";

export const departmentStore = defineStore({
    id: 'department',
    state: () => ({
        departments: [],
    }),
    getters: {},
    actions: {
        async loadDepartments() {
            let res = await Department.tree()
            this.departments = res.data
        }
    }
})
